package net.wwang.blog.commons.global;

/**
 * @Description:
 * @Author: WangWei
 */
public enum  ResponseState {
    /**
    *   HTPP状态码
    */
    SUCCESS(true,200,"OK"),
    FAILED(false,400," Bad Request"),
    UN_AUTHORIZED(false,401,"Unauthorized"),
    ERROR_405(false,405,"请求失败"),
    ERROR_404(false,404,"页面丢失"),
    ERROR_403(false,403,"权限不足"),
    ERROR_504(false,504,"系统繁忙，请稍后重试"),
    ERROR_505(false,505,"请求错误，请检查所提交数据"),
    ERROR_500(false,500,"系统错误");
    ResponseState(boolean success, int code, String message){
        this.success = success;
        this.code =code;
        this.message = message;
    }

    private int code;
    private String message;
    private boolean success;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

}
